package com.livegoods.controller;

import com.livegoods.commons.pojo.LivegoodsResult;
import com.livegoods.service.HotProductService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class HotProductController {


    @Autowired
    private HotProductService hotProductService;

    @GetMapping("/hotProduct")
    public LivegoodsResult hotProduct(String city){
        System.out.println("city = " + city);
        return hotProductService.findHotProductByCity(city);
    }

}
